<?php
use_helper('I18N');

// Define list of translatable strings here. For the XML part, Symfony's command line i18n:extract does its job.
$dictionary = array(
  'Some fields on the form have errors.' => __('Some fields on the form have errors.'),
  'Su'=> __('Su'), 'Mo' => __('Mo'), 'Tu'=> __('Tu'), 'We'=> __('We'), 'Th'=> __('Th'), 'Fr'=> __('Fr'), 'Sa'=> __('Sa'),
  'Sun'=> __('Sun'), 'Mon'=> __('Mon'), 'Tue'=> __('Tue'), 'Wed'=> __('Wed'), 'Thu'=> __('Thu'), 'Fri'=> __('Fri'), 'Sat'=> __('Sat'),
  'Sunday'=> __('Sunday'), 'Monday'=> __('Monday'), 'Tuesday'=> __('Tuesday'), 'Wednesday'=> __('Wednesday'), 'Thursday'=> __('Thursday'), 'Friday'=> __('Friday'), 'Saturday'=> __('Saturday'),
  'Jan'=> __('Jan'), 'Feb'=> __('Feb'), 'Mar'=> __('Mar'), 'Apr'=> __('Apr'), 'May'=> __('May'), 'Jun'=> __('Jun'), 'Jul'=> __('Jul'), 'Aug'=> __('Aug'), 'Sep'=> __('Sep'), 'Oct'=> __('Oct'), 'Nov'=> __('Nov'), 'Dec'=> __('Dec'),
  'January'=> __('January'), 'February'=> __('February'), 'March'=> __('March'), 'April'=> __('April'), 'May'=> __('May'), 'June'=> __('June'), 'July'=> __('July'), 'August'=> __('August'), 'September'=> __('September'), 'October'=> __('October'), 'November'=> __('November'), 'December'=> __('December'),
  'If you are thinking to move people and material, please, use the "relocation" pack. Use this formulaire only to move material' => __('If you are thinking to move people and material, please, use the "relocation" pack. Use this formulaire only to move material'),
  'Are you sure?'=> __('Are you sure?'),
);
?>

<script type="text/javascript">
// <![CDATA[
var i18n = {
  <?php
  $count = 0;
  foreach ($dictionary as $key => $val) {
    echo "'". html_entity_decode(htmlentities($key, ENT_QUOTES)) ."':'". html_entity_decode(htmlentities($val, ENT_QUOTES)) ."'". ((count($dictionary) - 1 == $count++) ? '' : ',');
  }
  ?>
};

function __(key) {
  return (i18n[key] ? i18n[key] : key);
};
// ]]>
</script>